Repository navigation
Conversation
GitHub blocks pull_request_target by default in public repositories from 2026-12-02, with brownouts before then, and a blocked Backport run never starts. Trigger on the push of the merge commit to main or release-*, find the pull request merged as that commit, and hand it to backport-action via source_pr_number when it carries a backport label. Take the backport's committer from the merged commit's first valid Signed-off-by, so the DCO check matches it when a squash merge records the author under a different (noreply) email. Falls back to the github-actions[bot] account. Moves to korthout/backport-action v4.7.0, pinned by SHA, for source_pr_number and the committer inputs; v4's only breaking change is Node 24. Same change as kubevela/kubevela#7586. Signed-off-by: Brian Kane <briankane1@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #288 +/- ##
===========================================
+ Coverage 62.49% 80.31% +17.82%
===========================================
Files 62 88 +26
Lines 4415 7040 +2625
===========================================
+ Hits 2759 5654 +2895
- Misses 1324 1386 +62
+ Partials 332 0 -332
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
anoop2811
left a comment
There was a problem hiding this comment.
Thanks Brian. I had #292 open for the same problem and have closed it in favour of this.
Two things while you're here:
-
issue-commands.yml in this repo still pins backport-action v0.0.8 for the
/backportcomment command, so the sign-off fix won't apply when someone backports by comment. Do you want to bump it in this PR as well? -
That command runs with
permission-level: read, so on a public repo anyone can trigger it. Could you change it towriteat the same time?
I've added the same Actions policy here as on kubevela/kubevela: it allows push, issue_comment and pull_request_target for back-port.yaml, so the push trigger won't be blocked after Dec 2.
…ackport Only take a pull request merged into the pushed branch, so creating a release branch at an already-merged commit does not backport that PR again. No sleep after the last lookup attempt. Require write access for /backport: with read, anyone could comment it on a merged PR to add a label and open a backport. The comment command moves to backport-action v4.7.0 with the same sign-off committer as back-port, awaits github.rest.issues.addLabels, and the job declares the permissions it uses. Signed-off-by: Brian Kane <briankane1@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks. Both done in e9583ae: While I was in there: the label step called |
Signed-off-by: Brian Kane <briankane1@gmail.com>
Description of your changes
Same change as kubevela/kubevela#7586, applied to this repo's backport workflow.
1. Run on push instead of
pull_request_target. GitHub blockspull_request_targetby default in public repositories from 2026-12-02, with brownouts before then; a blocked run never starts, so the backport is silently skipped (kubevela/kubevela#7589 lost its backport this way on 2026-11-16). The workflow now triggers on the push of the merge commit tomainorrelease-*, looks up the pull request merged into that branch as that commit, and, if it carries abackport ...label, hands it to backport-action viasource_pr_number. Matching the base branch keeps a new release branch, created at an already-merged commit, from backporting that PR again. A push to this repo gets a writableGITHUB_TOKEN, and nothing from the fork is checked out.2. Commit backports under the merged commit's sign-off. A squash merge records the author under their GitHub commit email (a
noreplyaddress when they keep it private), while the carried-overSigned-off-by:uses another. The bot's cherry-pick then has a sign-off matching neither its author nor itsgithub-actions[bot]committer, and DCO fails. The committer is now taken from the merged commit's first validSigned-off-by(Name <email>), falling back to thegithub-actions[bot]account.3. Moves to
korthout/backport-actionv4.7.0, pinned by SHA (was the floating@v3tag), forsource_pr_numberand the committer inputs. v4's only breaking change is Node 24, which GitHub-hosted runners have.4.
/backportcomment command. It needswriteaccess instead ofread, so a commenter without it fails at the command step, before the label or the PR. It moves fromzeebe-io/backport-action@v0.0.8to the same v4.7.0 pin with the same sign-off committer step, so comment backports pass DCO too. The label step now awaitsgithub.rest.issues.addLabels;github.issuesdoes not exist in github-script v7, so it threw on every valid command. The job also declares thecontents,pull-requestsandissueswrite permissions it uses.I have:
make reviewableto ensure this PR is ready for review. Not applicable: workflow files only.backport release-x.ylabels to auto-backport this PR if necessary. Not needed: backports start from merges to main, which run main's copy.How has this code been tested
The steps were tested in kubevela/kubevela#7586, run as they sit in the YAML under
bash -eo pipefailagainst real kubevela commits: a labelled merge resolves to its PR number, an unlabelled one is skipped, the same commit pushed as a new release branch is skipped, a commit that is no PR's merge commit exits 0, and the sign-off parser falls back on missing or malformed lines.back-porthere differs only inmainformaster. Not yet tested end to end; that needs a labelled squash merge.Special notes for your reviewer
with:inputs, never arun:script, and must matchName <email>first.contents: writeandpull-requests: writeexplicitly instead of relying on the repo's default token permissions.